package cn.yj.syslog.filter;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 注册Filter
 *
 * @author 永健
 * @since 2022-01-07 17:11
 */
@Configuration
public class FilterConfig {


    @Bean
    public FilterRegistrationBean httpServletRequestReplacedRegistration() {
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(new RequestFilter());
        registration.addUrlPatterns("/*");
        // 等级往后一点
        registration.setOrder(100);
        return registration;
    }
}
